<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
<title>会员中心-{$web_config['web_title']}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<meta name="renderer" content="webkit">
<link href="/assets/css/frontend.min.css?v=1.0.1" rel="stylesheet">

<!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
<!--[if lt IE 9]>
  <script src="/assets/js/html5shiv.js"></script>
  <script src="/assets/js/respond.min.js"></script>
<![endif]-->
        <link href="/assets/css/user.css?v=1.0.1" rel="stylesheet">
		<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
    </head>

    <body>
        {include file="header"}
        <main class="content">
            <style>
    .basicinfo {
        margin: 15px 0;
    }

    .basicinfo .row > .col-xs-4 {
        padding-right: 0;
    }

    .basicinfo .row > div {
        margin: 5px 0;
    }
</style>


<div id="content-container" class="container">
    <div class="row">
        {include file="user_left"}
        <div class="col-md-10">
            <div class="panel panel-default ">
                <div class="panel-body">
					<h2 class="page-header">订单管理</h2>

					<script type="text/javascript" src="/template/datetime/moment.min.js"></script>
                    <script type="text/javascript" src="/template/datetime/daterangepicker.min.js"></script>
                    <link rel="stylesheet" type="text/css" href="/template/datetime/daterangepicker.css" />
					<div id="toolbar" class="toolbar" style="margin-bottom:10px;">
                    	<input id="demo"></input>
						<button class="btn btn-success btn-addtabs export" title="导出全部"><i class="fa fa-plus"></i> 导出订单</button>
					</div>					<script>
                    $(function () {
                        var locale = {
                            "format": 'YYYY-MM-DD',
                            "separator": " - ",
                            "applyLabel": "确定",
                            "cancelLabel": "取消",
                            "fromLabel": "起始时间",
                            "toLabel": "结束时间'",
                            "customRangeLabel": "自定义",
                            "weekLabel": "W",
                            "daysOfWeek": ["日", "一", "二", "三", "四", "五", "六"],
                            "monthNames": ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
                            "firstDay": 1
                        };
                        $('#demo').daterangepicker({
                            'locale': locale,
                            ranges: {
                                '今日': [moment(), moment()],
                                '昨日': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
                                '最近7日': [moment().subtract(6, 'days'), moment()],
                                '最近30日': [moment().subtract(29, 'days'), moment()],
                                '本月': [moment().startOf('month'), moment().endOf('month')],
                                '上月': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month')
                                    .endOf('month')
                                ]
                            },
                            "alwaysShowCalendars": true,
                            "startDate": new Date(),
                            "endDate": new Date(),
                            "opens": "right",
                        }, function (start, end, label) {
                            console.log('New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') + ' (predefined range: ' + label + ')');
                        });
                    })
                </script>
                <style>
                    input {
                        height: 28px;
                        line-height: 28px;
                        text-align: center;
                    }
                    .btn-default {
                        background-color: #fff;
                        border: 1px solid #828080;
                        border-radius: 3px;
                        cursor: pointer;
                    }
                    .btn-primary {
                        background-color: #08c;
                        border: 1px solid #08c;
                        border-radius: 3px;
                        color: #fff;
                        cursor: pointer;
                    }
                    .btn-primary:hover{
                        background-color: #357ebd;
                    }
                </style>

				   <div class="form-group">
						
                            <table class="table table-bordered">

                                <tbody>
									{volist name="order" id="vo"}
                                    <tr>
                                        <th colspan="5">编号：{$vo.o_sncode}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;支付时间：{$vo.o_addtime}</th>
                                    </tr>
									<tr style="{if $vo.o_status==1}background:#F3F3F3;{else}background:#E1FBED;{/if}">
										<td>{$vo.pf_title}</td>
                                        <td>{$vo.w_title}</td>
                                        <td>
                                        	<p>{$vo.gift_title}</p>
                                            <p>商品总价：{$vo.o_gift_money}</p>
                                         </td>
										<td>
                                        
                                        <p>快递总价：{$vo.o_kd_money}</p>
                                        <p>任务总价：{$vo.o_zmoney}</p>
                                        </td>
										<td>
                                        {if $vo.o_status==1}出单中
                                        {else}
                                        <p style=" color:#090">已发出<p>
                                        <p>单号：{$vo.o_kddh_sncode}</p>
                                        {/if}</td>
									</tr>
									<tr>
										<td colspan="5">收货人：{$vo.o_sho_name}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;收货电话：{$vo.o_sho_phone}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;收货地址：{$vo.o_sho_address}</td>
										<!--<td>{$vo.o_sho_address}</td>-->
									</tr>
									{/volist}
                                </tbody>
                            </table>
 <div class="fixed-table-pagination">{$page}</div>
                  </div>
				   
				   
				   
					
                </div>
            </div>
        </div>
    </div>
</div>
        </main>
		{include file="footer_content"}
<script>

$(".export").click(function(){
	var datetime = $("#demo").val();
	if(datetime == ""){
		alert("请先选择导出的时间！");
		return false;
	}
	
	url = "{:url('order/export',array('datetime'=>'AAAAA'))}";
	url = url.replace('AAAAA', datetime);
	window.open(url); 

});
</script>
    </body>
</html>